﻿using System;
using Loki.UI;
using Loki.Utils;

namespace Luna.UI
{
    public class NavigationMenuViewModel : LunaViewModel
    {
        public NavigationMenuViewModel()
        {
            Groups = new LokiCollection<CommandGroupViewModel>();

            Init += NavigationMenuViewModel_Init;
        }

        public LokiCollection<CommandGroupViewModel> Groups { get; private set; }

        private void NavigationMenuViewModel_Init(object P_Sender, EventArgs e)
        {
            var L_CRM = new CommandGroupViewModel() { Name = "CRM" };
            L_CRM.Commands.Add(new CommandViewModel() { Name = "Comptes", Command = NavigationCommands.ACCOUNTS });
            L_CRM.Commands.Add(new CommandViewModel() { Name = "Contacts", Command = NavigationCommands.CONTACTS });
            L_CRM.Commands.Add(new CommandViewModel() { Name = "Categories", Command = NavigationCommands.CATEGORIES });
            Groups.Add(L_CRM);

            var L_Budget = new CommandGroupViewModel() { Name = "Trésorerie" };
            L_Budget.Commands.Add(new CommandViewModel() { Name = "Budget", Command = NavigationCommands.BUDGET_LIST });
            L_Budget.Commands.Add(new CommandViewModel() { Name = "Categories", Command = NavigationCommands.BUDGET_CATEGORIES });
            L_Budget.Commands.Add(new CommandViewModel() { Name = "Comptabilité" });

            Groups.Add(L_Budget);
        }
    }
}